Attributes provide a powerful method of associating declarative information with c code types , methods , properties , and so forth 属性提供功能强大的方法以将声明信息与c #代码(类型、方法、属性等)相关联。
New kinds of declarative information are defined through the declaration of attribute classes , which might have positional and named parameters 新的声明性信息类型通过属性类的声明来定义,这些类可能有定位参数和命名参数。
The declarative information is transformed into an imperative form at compile - time , rather than each time it is used at runtime , resulting in faster code 声明式信息在编译时转换为命令形式,而不是在运行时每次使用时进行转换,这使代码更快。
The . net framework makes component interoperation even easier by allowing compilers to emit additional declarative information into all modules and assemblies . net framework允许编译器向所有的模块和程序集发出附加的说明性信息,从而使组件互用更加简单。